# Contributor: Danct12 <danct12@disroot.org>
# Maintainer: Danct12 <danct12@disroot.org>
pkgname=wayfire
pkgver=0.8.0
pkgrel=1
pkgdesc="Compiz-clone Wayland compositor"
url="https://wayfire.org"
arch="all"
license="MIT"
install="$pkgname.post-install"
makedepends="
	meson
	wlroots0.16-dev
	glm-dev
	wf-config-dev
	cairo-dev
	libxml2-dev
	wayland-protocols
	pango-dev
	nlohmann-json
	"
subpackages="$pkgname-dev $pkgname-doc"
source="https://github.com/WayfireWM/wayfire/releases/download/v$pkgver/wayfire-$pkgver.tar.xz
	$pkgname-meson-fix.patch::https://github.com/WayfireWM/wayfire/commit/e83cd34134b81638c94c846e0d476669185194f6.patch
	"
options="!check" # no testsuite

build() {
	abuild-meson \
		-Duse_system_wlroots=enabled \
		-Duse_system_wfconfig=enabled \
		. output
	meson compile -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output

	install -Dm644 wayfire.ini "$pkgdir"/usr/share/wayfire/wayfire.ini.default
	install -Dm644 wayfire.desktop "$pkgdir"/usr/share/wayland-sessions/wayfire.desktop
}

sha512sums="
fab55f6112c462312edf43d41b29f476d493449eca8f0c5cfee8f3aae73dcb98be46c589fc23d10d961f738bdf6d1fe78286b4c96e1d4444fdc8b1b898d998a9  wayfire-0.8.0.tar.xz
150d65dd50ed0670f96dea201736395f87e01716cf0f8b90b91707c3bfe6ef254df0108a906c637e4937ecad10005ac62312c06f6ee10a9f6260a0148ecaa6f6  wayfire-meson-fix.patch
"
